using SDL;

abstract class Layer : Object {
	public uint32 colorkey;
	public Surface surface;
	public Rectangle dimensions { get; protected set; }

	public virtual void render(Screen surface) {
		int result = this.surface.blit(null, surface, null); // select rectangle...; why?
	}

	public Layer(Rectangle dimensions) {
		this.dimensions = dimensions;
		uint32 flags = SurfaceFlag.DOUBLEBUF | SurfaceFlag.HWACCEL | SurfaceFlag.HWSURFACE;
		this.surface = new Surface.RGB(flags, this.dimensions.width, this.dimensions.height, 32, 0, 0, 0, 255);
		this.colorkey = this.surface.format.map_rgb(255, 0, 255); // pink
		this.surface.set_colorkey(SurfaceFlag.SRCCOLORKEY, this.colorkey);
	}

}

